<html>
    <head>
        <title>vue模拟</title>
    </head>
    <body>
        <div id="app">
            <h1>差值表达式</h1>
            <h3>哈哈 {{msg}}</h3>
            <h1>v-text</h1>
            <h3 v-text="msg"></h3>
            <h1>v-model</h1>
            <input type="text" v-model="msg">
            <h1>v-html</h1>
            <h3 v-html="str"></h3>
            <h1>v-on</h1>
            <h3 v-on:click="clickHandler">点击弹出对话框</h3>
        </div>
        <script src="./js/dep.js"></script>
        <script src="./js/watcher.js"></script>
        <script src="./js/observer.js"></script>
        <script src="./js/compiler.js"></script>
        <script src="./js/vue.js"></script>
        <script>
            let vm = new Vue({
                el: '#app',
                data: {
                    msg: 'Hello Vue',
                    person: {name: 'abc'},
                    str: '<span style="color:#f00">Hello World!</span>'
                },
                methods: {
                    clickHandler () {
                        alert('已点击')
                    }
                }
            })
            //console.log(vm.msg)
        </script>
    </body>
</html>